package com.shine.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shine.entity.Menu;
import com.shine.info.MenuInfo;
import com.shine.request.MenuPageRequest;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author huihui
 * @date 2025/10/11 16:19
 * @description MenuMapper
 */
public interface MenuMapper extends BaseMapper<Menu> {

    /**
     * 分页查询菜单
     *
     * @param iPage
     * @param request
     * @return
     */
    IPage<MenuInfo> pageQuery(Page<Menu> iPage, @Param("request") MenuPageRequest request);

    List<MenuInfo> listByUserId(@Param("type") Integer type, @Param("userId") Long userId);


}
